<template>
	<view class="content">
		<view class="img">
			<view class="icon">
				<up-icon v-if="!flag" name="info-circle-fill" color="#ff9900" size="68"></up-icon>
				<up-icon  v-else name="checkmark-circle-fill" color="#19be6b" size="68"></up-icon>
			</view>
			<view class="text1">
				{{flag?'支付成功':'支付失败'}}
			</view>
			<navigator :url="`./order/orderDetails?id=`+order_id" class="text3" open-type="redirect">
				{{flag?'查看订单':'重新支付'}}
			</navigator>
			<navigator hover-class="on" open-type="switchTab" url="/pages/index/index" class="text4">
				返回首页
			</navigator>
		</view>
	</view>
</template>

<script setup>
	import {ref} from "vue"
	import {onLoad} from "@dcloudio/uni-app"
	const flag=ref('')
	const order_id=ref('')
	onLoad((obj)=>{
		flag.value=obj.type==1?true:false
		order_id.value=obj.orderId
	})
	
</script>

<style lang="scss" scoped>
.content {
		background-color: #FFF;
		height:100vh;
	}
	.img{
		display:flex;
		flex-direction: column;
		align-items: center;
		padding-top:200rpx;
		image{
			width:200rpx;
			height:200rpx;
			display: block;
		}
		.text1{
			font-size:36rpx;
			color: #F5493D;
			margin-top:48rpx;
		}
		.text2{
			font-size:28rpx;
			color: #141311;
			margin-top:24rpx;
		}
		.text3{
			width: 380rpx;
			height: 88rpx;
			background-color: #F5493D;
			border-radius: 44rpx  44rpx  44rpx  44rpx;
			text-align: center;
			line-height: 88rpx;
			color: #FFFFFF;
			font-size: 32rpx;
			margin-top:120rpx;
		}
		.text4{
			width: 380rpx;
			height: 88rpx;
			border: 1px solid #F5493D;
			border-radius: 44rpx  44rpx  44rpx  44rpx;
			text-align: center;
			line-height: 88rpx;
			color: #F5493D;
			font-size: 32rpx;
			margin-top:20rpx;
		}
	}
</style>
